import request from '@/request/request'

// 获取账户列表
export function getAccountList(params) {
  return request({
    url: '/finance/account/list',
    method: 'get',
    params
  })
}

// 获取所有账户（不分页）
export function getAllAccounts(params) {
  return request({
    url: '/finance/account/all',
    method: 'get',
    params
  })
}

// 获取账户详情
export function getAccountDetail(id) {
  return request({
    url: `/finance/account/detail/${id}`,
    method: 'get'
  })
}

// 新增账户
export function addAccount(data) {
  return request({
    url: '/finance/account/add',
    method: 'post',
    data
  })
}

// 修改账户
export function updateAccount(data) {
  return request({
    url: '/finance/account/update',
    method: 'put',
    data
  })
}

// 删除账户
export function deleteAccount(id) {
  return request({
    url: `/finance/account/delete/${id}`,
    method: 'delete'
  })
}

// 批量删除账户
export function batchDeleteAccount(ids) {
  return request({
    url: '/finance/account/batchDelete',
    method: 'delete',
    data: ids
  })
} 